package com.igroupes.ovineherd.model.dto;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 数据批量添加
 */
@Data
public class RelationshipRequest {
    @NotEmpty(message = "不能为空")
    Long sourceTableId;
    @NotEmpty(message = "不能为空")
    Long sourceFiledId;
    @NotEmpty(message = "不能为空")
    Long targetTableId;
    @NotEmpty(message = "不能为空")
    Long targetFiledId;
    @NotNull(message = "关系类型不能为空")
    @Min(value = 1,message = "关系类型最小值为1")
    @Max(value = 2,message = "关系类型最大值为2")
    Integer sourceType;
    @NotNull(message = "关系类型不能为空")
    @Min(value = 1,message = "关系类型最小值为1")
    @Max(value = 2,message = "关系类型最大值为2")
    Integer targetType; //1.一 2.多
}
